Integrand size = 30, antiderivative size = 351 \[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=-\frac {e x}{b}-\frac {f x^2}{2 b}-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{a d}-\frac {i \sqrt {a^2-b^2} (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{a b d}+\frac {i \sqrt {a^2-b^2} (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{a b d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{a d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{a d^2}-\frac {\sqrt {a^2-b^2} f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{a b d^2}+\frac {\sqrt {a^2-b^2} f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{a b d^2} \]
-e*x/b-1/2*f*x^2/b-2*(f*x+e)*arctanh(exp(I*(d*x+c)))/a/d+I*f*polylog(2,-ex p(I*(d*x+c)))/a/d^2-I*f*polylog(2,exp(I*(d*x+c)))/a/d^2-I*(f*x+e)*ln(1-I*b *exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))*(a^2-b^2)^(1/2)/a/b/d+I*(f*x+e)*ln(1- I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))*(a^2-b^2)^(1/2)/a/b/d-f*polylog(2, I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))*(a^2-b^2)^(1/2)/a/b/d^2+f*polylog( 2,I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))*(a^2-b^2)^(1/2)/a/b/d^2
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(876\) vs. \(2(351)=702\).
Time = 6.19 (sec) , antiderivative size = 876, normalized size of antiderivative = 2.50 \[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {(c+d x) (c f-d (2 e+f x))}{b}+\frac {2 d e \log \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a}-\frac {2 c f \log \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a}+\frac {2 f \left ((c+d x) \left (\log \left (1-e^{i (c+d x)}\right )-\log \left (1+e^{i (c+d x)}\right )\right )+i \left (\operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )-\operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )\right )\right )}{a}+\frac {2 \left (a^2-b^2\right ) d (e+f x) \left (\frac {2 (d e-c f) \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i f \log \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {-b+\sqrt {-a^2+b^2}-a \tan \left (\frac {1}{2} (c+d x)\right )}{i a-b+\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}-\frac {i f \log \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {b-\sqrt {-a^2+b^2}+a \tan \left (\frac {1}{2} (c+d x)\right )}{i a+b-\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}-\frac {i f \log \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {b+\sqrt {-a^2+b^2}+a \tan \left (\frac {1}{2} (c+d x)\right )}{-i a+b+\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}+\frac {i f \log \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {b+\sqrt {-a^2+b^2}+a \tan \left (\frac {1}{2} (c+d x)\right )}{i a+b+\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}-\frac {i f \operatorname {PolyLog}\left (2,\frac {a \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a+i \left (b+\sqrt {-a^2+b^2}\right )}\right )}{\sqrt {-a^2+b^2}}+\frac {i f \operatorname {PolyLog}\left (2,\frac {a \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{a-i \left (b+\sqrt {-a^2+b^2}\right )}\right )}{\sqrt {-a^2+b^2}}+\frac {i f \operatorname {PolyLog}\left (2,\frac {a \left (i+\tan \left (\frac {1}{2} (c+d x)\right )\right )}{i a-b+\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}-\frac {i f \operatorname {PolyLog}\left (2,\frac {a+i a \tan \left (\frac {1}{2} (c+d x)\right )}{a+i \left (-b+\sqrt {-a^2+b^2}\right )}\right )}{\sqrt {-a^2+b^2}}\right )}{a b \left (d e-c f+i f \log \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right )-i f \log \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right )\right )}}{2 d^2} \]
(((c + d*x)*(c*f - d*(2*e + f*x)))/b + (2*d*e*Log[Tan[(c + d*x)/2]])/a - ( 2*c*f*Log[Tan[(c + d*x)/2]])/a + (2*f*((c + d*x)*(Log[1 - E^(I*(c + d*x))] - Log[1 + E^(I*(c + d*x))]) + I*(PolyLog[2, -E^(I*(c + d*x))] - PolyLog[2 , E^(I*(c + d*x))])))/a + (2*(a^2 - b^2)*d*(e + f*x)*((2*(d*e - c*f)*ArcTa n[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] + (I*f*Log[1 - I*Tan[(c + d*x)/2]]*Log[(-b + Sqrt[-a^2 + b^2] - a*Tan[(c + d*x)/2])/(I* a - b + Sqrt[-a^2 + b^2])])/Sqrt[-a^2 + b^2] - (I*f*Log[1 + I*Tan[(c + d*x )/2]]*Log[(b - Sqrt[-a^2 + b^2] + a*Tan[(c + d*x)/2])/(I*a + b - Sqrt[-a^2 + b^2])])/Sqrt[-a^2 + b^2] - (I*f*Log[1 - I*Tan[(c + d*x)/2]]*Log[(b + Sq rt[-a^2 + b^2] + a*Tan[(c + d*x)/2])/((-I)*a + b + Sqrt[-a^2 + b^2])])/Sqr t[-a^2 + b^2] + (I*f*Log[1 + I*Tan[(c + d*x)/2]]*Log[(b + Sqrt[-a^2 + b^2] + a*Tan[(c + d*x)/2])/(I*a + b + Sqrt[-a^2 + b^2])])/Sqrt[-a^2 + b^2] - ( I*f*PolyLog[2, (a*(1 - I*Tan[(c + d*x)/2]))/(a + I*(b + Sqrt[-a^2 + b^2])) ])/Sqrt[-a^2 + b^2] + (I*f*PolyLog[2, (a*(1 + I*Tan[(c + d*x)/2]))/(a - I* (b + Sqrt[-a^2 + b^2]))])/Sqrt[-a^2 + b^2] + (I*f*PolyLog[2, (a*(I + Tan[( c + d*x)/2]))/(I*a - b + Sqrt[-a^2 + b^2])])/Sqrt[-a^2 + b^2] - (I*f*PolyL og[2, (a + I*a*Tan[(c + d*x)/2])/(a + I*(-b + Sqrt[-a^2 + b^2]))])/Sqrt[-a ^2 + b^2]))/(a*b*(d*e - c*f + I*f*Log[1 - I*Tan[(c + d*x)/2]] - I*f*Log[1 + I*Tan[(c + d*x)/2]])))/(2*d^2)
Time = 2.10 (sec) , antiderivative size = 406, normalized size of antiderivative = 1.16, number of steps used = 22, number of rules used = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {5054, 4908, 3042, 3777, 3042, 3117, 4671, 2715, 2838, 5036, 17, 3042, 3777, 3042, 3117, 3804, 2694, 27, 2620, 2715, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 5054 |
\(\displaystyle \frac {\int (e+f x) \cos (c+d x) \cot (c+d x)dx}{a}-\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 4908 |
\(\displaystyle \frac {\int (e+f x) \csc (c+d x)dx-\int (e+f x) \sin (c+d x)dx}{a}-\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x) \csc (c+d x)dx-\int (e+f x) \sin (c+d x)dx}{a}-\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {\int (e+f x) \csc (c+d x)dx-\frac {f \int \cos (c+d x)dx}{d}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x) \csc (c+d x)dx-\frac {f \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{d}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {\int (e+f x) \csc (c+d x)dx-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle -\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {-\frac {f \int \log \left (1-e^{i (c+d x)}\right )dx}{d}+\frac {f \int \log \left (1+e^{i (c+d x)}\right )dx}{d}-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle -\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {\frac {i f \int e^{-i (c+d x)} \log \left (1-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}-\frac {i f \int e^{-i (c+d x)} \log \left (1+e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle -\frac {b \int \frac {(e+f x) \cos ^2(c+d x)}{a+b \sin (c+d x)}dx}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 5036 |
\(\displaystyle -\frac {b \left (-\frac {\left (a^2-b^2\right ) \int \frac {e+f x}{a+b \sin (c+d x)}dx}{b^2}+\frac {a \int (e+f x)dx}{b^2}-\frac {\int (e+f x) \sin (c+d x)dx}{b}\right )}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle -\frac {b \left (-\frac {\left (a^2-b^2\right ) \int \frac {e+f x}{a+b \sin (c+d x)}dx}{b^2}-\frac {\int (e+f x) \sin (c+d x)dx}{b}+\frac {a (e+f x)^2}{2 b^2 f}\right )}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {b \left (-\frac {\left (a^2-b^2\right ) \int \frac {e+f x}{a+b \sin (c+d x)}dx}{b^2}-\frac {\int (e+f x) \sin (c+d x)dx}{b}+\frac {a (e+f x)^2}{2 b^2 f}\right )}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\frac {b \left (-\frac {\left (a^2-b^2\right ) \int \frac {e+f x}{a+b \sin (c+d x)}dx}{b^2}-\frac {\frac {f \int \cos (c+d x)dx}{d}-\frac {(e+f x) \cos (c+d x)}{d}}{b}+\frac {a (e+f x)^2}{2 b^2 f}\right )}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {b \left (-\frac {\left (a^2-b^2\right ) \int \frac {e+f x}{a+b \sin (c+d x)}dx}{b^2}-\frac {\frac {f \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{d}-\frac {(e+f x) \cos (c+d x)}{d}}{b}+\frac {a (e+f x)^2}{2 b^2 f}\right )}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle -\frac {b \left (-\frac {\left (a^2-b^2\right ) \int \frac {e+f x}{a+b \sin (c+d x)}dx}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}+\frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 3804 |
\(\displaystyle \frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \left (-\frac {2 \left (a^2-b^2\right ) \int \frac {e^{i (c+d x)} (e+f x)}{2 e^{i (c+d x)} a-i b e^{2 i (c+d x)}+i b}dx}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}\) |
\(\Big \downarrow \) 2694 |
\(\displaystyle \frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \left (-\frac {2 \left (a^2-b^2\right ) \left (\frac {i b \int \frac {e^{i (c+d x)} (e+f x)}{2 \left (a-i b e^{i (c+d x)}+\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}-\frac {i b \int \frac {e^{i (c+d x)} (e+f x)}{2 \left (a-i b e^{i (c+d x)}-\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}\right )}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \left (-\frac {2 \left (a^2-b^2\right ) \left (\frac {i b \int \frac {e^{i (c+d x)} (e+f x)}{a-i b e^{i (c+d x)}+\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}-\frac {i b \int \frac {e^{i (c+d x)} (e+f x)}{a-i b e^{i (c+d x)}-\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}\right )}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \left (-\frac {2 \left (a^2-b^2\right ) \left (\frac {i b \left (\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {f \int \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )dx}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {f \int \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )dx}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \left (-\frac {2 \left (a^2-b^2\right ) \left (\frac {i b \left (\frac {i f \int e^{-i (c+d x)} \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )de^{i (c+d x)}}{b d^2}+\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {i f \int e^{-i (c+d x)} \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )de^{i (c+d x)}}{b d^2}+\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {-\frac {2 (e+f x) \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {i f \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d^2}-\frac {i f \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d^2}-\frac {f \sin (c+d x)}{d^2}+\frac {(e+f x) \cos (c+d x)}{d}}{a}-\frac {b \left (-\frac {2 \left (a^2-b^2\right ) \left (\frac {i b \left (\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}-\frac {i f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b d^2}\right )}{2 \sqrt {a^2-b^2}}-\frac {i b \left (\frac {(e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}-\frac {i f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^2}\right )}{2 \sqrt {a^2-b^2}}\right )}{b^2}+\frac {a (e+f x)^2}{2 b^2 f}-\frac {\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}}{b}\right )}{a}\) |
((-2*(e + f*x)*ArcTanh[E^(I*(c + d*x))])/d + ((e + f*x)*Cos[c + d*x])/d + (I*f*PolyLog[2, -E^(I*(c + d*x))])/d^2 - (I*f*PolyLog[2, E^(I*(c + d*x))]) /d^2 - (f*Sin[c + d*x])/d^2)/a - (b*((a*(e + f*x)^2)/(2*b^2*f) - (2*(a^2 - b^2)*(((-1/2*I)*b*(((e + f*x)*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*d) - (I*f*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b ^2])])/(b*d^2)))/Sqrt[a^2 - b^2] + ((I/2)*b*(((e + f*x)*Log[1 - (I*b*E^(I* (c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*d) - (I*f*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b*d^2)))/Sqrt[a^2 - b^2]))/b^2 - (-(((e + f*x)*Cos[c + d*x])/d) + (f*Sin[c + d*x])/d^2)/b))/a
3.4.27.3.1 Defintions of rubi rules used
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) *(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q) Int [(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q) Int[(f + g*x) ^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( -(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*C os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Sy mbol] :> Simp[2 Int[(c + d*x)^m*(E^(I*(e + f*x))/(I*b + 2*a*E^(I*(e + f*x )) - I*b*E^(2*I*(e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ [a^2 - b^2, 0] && IGtQ[m, 0]
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[- 2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*x))]/f), x] + (-Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x )^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IG tQ[m, 0]
Int[Cos[(a_.) + (b_.)*(x_)]^(n_.)*Cot[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d _.)*(x_))^(m_.), x_Symbol] :> -Int[(c + d*x)^m*Cos[a + b*x]^n*Cot[a + b*x]^ (p - 2), x] + Int[(c + d*x)^m*Cos[a + b*x]^(n - 2)*Cot[a + b*x]^p, x] /; Fr eeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]
Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.) *Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[a/b^2 Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] + (-Simp[1/b Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)* Sin[c + d*x], x], x] - Simp[(a^2 - b^2)/b^2 Int[(e + f*x)^m*(Cos[c + d*x] ^(n - 2)/(a + b*Sin[c + d*x])), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[n, 1] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
Int[(Cos[(c_.) + (d_.)*(x_)]^(p_.)*Cot[(c_.) + (d_.)*(x_)]^(n_.)*((e_.) + ( f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp [1/a Int[(e + f*x)^m*Cos[c + d*x]^p*Cot[c + d*x]^n, x], x] - Simp[b/a I nt[(e + f*x)^m*Cos[c + d*x]^(p + 1)*(Cot[c + d*x]^(n - 1)/(a + b*Sin[c + d* x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && IGtQ[n, 0] && IGtQ[p, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1188 vs. \(2 (311 ) = 622\).
Time = 0.61 (sec) , antiderivative size = 1189, normalized size of antiderivative = 3.39
-1/2*f*x^2/b-e*x/b-1/d*f/a*ln(exp(I*(d*x+c))+1)*x+1/d*e/a*ln(exp(I*(d*x+c) )-1)-1/b/d^2*f*a/(-a^2+b^2)^(1/2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2 ))/(I*a+(-a^2+b^2)^(1/2)))*c+1/b/d^2*f*a/(-a^2+b^2)^(1/2)*ln((-I*a-b*exp(I *(d*x+c))+(-a^2+b^2)^(1/2))/(-I*a+(-a^2+b^2)^(1/2)))*c-2*I/b/d^2*a*f*c/(-a ^2+b^2)^(1/2)*arctan(1/2*(2*I*b*exp(I*(d*x+c))-2*a)/(-a^2+b^2)^(1/2))-b/d* f/a/(-a^2+b^2)^(1/2)*ln((-I*a-b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(-I*a+(-a ^2+b^2)^(1/2)))*x+b/d*f/a/(-a^2+b^2)^(1/2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+ b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*x-I/b/d^2*f*a/(-a^2+b^2)^(1/2)*dilog(( -I*a-b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(-I*a+(-a^2+b^2)^(1/2)))+I*b/d^2*f /a/(-a^2+b^2)^(1/2)*dilog((-I*a-b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(-I*a+( -a^2+b^2)^(1/2)))-b/d^2*f/a/(-a^2+b^2)^(1/2)*ln((-I*a-b*exp(I*(d*x+c))+(-a ^2+b^2)^(1/2))/(-I*a+(-a^2+b^2)^(1/2)))*c+b/d^2*f/a/(-a^2+b^2)^(1/2)*ln((I *a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*c+2*I/b/d*a* e/(-a^2+b^2)^(1/2)*arctan(1/2*(2*I*b*exp(I*(d*x+c))-2*a)/(-a^2+b^2)^(1/2)) -2*I*b/d*e/a/(-a^2+b^2)^(1/2)*arctan(1/2*(2*I*b*exp(I*(d*x+c))-2*a)/(-a^2+ b^2)^(1/2))+2*I*b/d^2*f*c/a/(-a^2+b^2)^(1/2)*arctan(1/2*(2*I*b*exp(I*(d*x+ c))-2*a)/(-a^2+b^2)^(1/2))-1/d*e/a*ln(exp(I*(d*x+c))+1)-I*b/d^2*f/a/(-a^2+ b^2)^(1/2)*dilog((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^( 1/2)))-1/b/d*f*a/(-a^2+b^2)^(1/2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2 ))/(I*a+(-a^2+b^2)^(1/2)))*x+1/b/d*f*a/(-a^2+b^2)^(1/2)*ln((-I*a-b*exp(...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1273 vs. \(2 (304) = 608\).
Time = 0.50 (sec) , antiderivative size = 1273, normalized size of antiderivative = 3.63 \[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\text {Too large to display} \]
-1/2*(a*d^2*f*x^2 + 2*a*d^2*e*x - I*b*f*sqrt(-(a^2 - b^2)/b^2)*dilog((I*a* cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(- (a^2 - b^2)/b^2) - b)/b + 1) + I*b*f*sqrt(-(a^2 - b^2)/b^2)*dilog((I*a*cos (d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^ 2 - b^2)/b^2) - b)/b + 1) + I*b*f*sqrt(-(a^2 - b^2)/b^2)*dilog((-I*a*cos(d *x + c) - a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) - I*b*f*sqrt(-(a^2 - b^2)/b^2)*dilog((-I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) + I*b*f*dilog(cos(d*x + c) + I*sin(d*x + c)) - I*b*f *dilog(cos(d*x + c) - I*sin(d*x + c)) + I*b*f*dilog(-cos(d*x + c) + I*sin( d*x + c)) - I*b*f*dilog(-cos(d*x + c) - I*sin(d*x + c)) - (b*d*e - b*c*f)* sqrt(-(a^2 - b^2)/b^2)*log(2*b*cos(d*x + c) + 2*I*b*sin(d*x + c) + 2*b*sqr t(-(a^2 - b^2)/b^2) + 2*I*a) - (b*d*e - b*c*f)*sqrt(-(a^2 - b^2)/b^2)*log( 2*b*cos(d*x + c) - 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) - 2*I*a ) + (b*d*e - b*c*f)*sqrt(-(a^2 - b^2)/b^2)*log(-2*b*cos(d*x + c) + 2*I*b*s in(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) + 2*I*a) + (b*d*e - b*c*f)*sqrt(- (a^2 - b^2)/b^2)*log(-2*b*cos(d*x + c) - 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a ^2 - b^2)/b^2) - 2*I*a) + (b*d*f*x + b*c*f)*sqrt(-(a^2 - b^2)/b^2)*log(-(I *a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqr t(-(a^2 - b^2)/b^2) - b)/b) - (b*d*f*x + b*c*f)*sqrt(-(a^2 - b^2)/b^2)*...
\[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\left (e + f x\right ) \cos {\left (c + d x \right )} \cot {\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Timed out. \[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out} \]
Timed out. \[ \int \frac {(e+f x) \cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx=\text {Hanged} \]